]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/private: Don't scale the framebuffer, only the blur pixels
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 7 Jan 2021 07:09:55 +0000 (15:09 +0800)
committerDaniel van Vugt <daniel.van.vugt@canonical.com>
Thu, 7 Jan 2021 07:35:55 +0000 (15:35 +0800)
Just as we did before e59069c012.

Callers already ensure the framebuffer is scaled so by scaling a second
time in `_st_create_shadow_pipeline` we actually got resource_scale² which
was visibly incorrect.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3505,
       https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3560

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1543>

src/st/st-private.c

index 83c0cac7658570eab3136b8de0cdb443de6d9da9..2bdcf9b4b9c85a0c6863c3f944739f835f6a4657 100644 (file)
@@ -400,7 +400,7 @@ _st_create_shadow_pipeline (StShadow    *shadow_spec,
   g_return_val_if_fail (shadow_spec != NULL, NULL);
   g_return_val_if_fail (src_texture != NULL, NULL);
 
-  sigma = shadow_spec->blur / 2.f;
+  sigma = resource_scale * shadow_spec->blur / 2.f;
   sampling_radius = ceilf (1.5 * sigma) * 2.0;
 
   src_width = cogl_texture_get_width (src_texture);
@@ -422,7 +422,6 @@ _st_create_shadow_pipeline (StShadow    *shadow_spec,
 
   cogl_framebuffer_clear4f (fb, COGL_BUFFER_BIT_COLOR, 0.f, 0.f, 0.f, 0.f);
   cogl_framebuffer_orthographic (fb, 0, 0, dst_width, dst_height, 0, 1.0);
-  cogl_framebuffer_scale (fb, resource_scale, resource_scale, 1);
 
   /* Blur */
   blur_node = clutter_blur_node_new (dst_width, dst_height, sigma);